<?php

declare(strict_types=1);

/**
 * Author: Jesse
 * Email : jessedev@163.com
 * Date: 2024/6/15 22:55
 * FileName: dependencies.php
 * DESC: The Relentless Pursuit of Perfection.
 */

return [
    // 可以有效避免高并发时，建立过多连接的问题
    Hyperf\JsonRpc\JsonRpcTransporter::class => Hyperf\JsonRpc\JsonRpcPoolTransporter::class,
    // 使用自定义rpc客户端
    Hyperf\RpcClient\ServiceClient::class => Common\Kernel\Rpc\ServiceClient::class,
    // 使用自定义序列化
    Hyperf\Contract\NormalizerInterface::class => Hyperf\Serializer\JsonDeNormalizer::class,

    /**
     * =====================
     * 以下业务代码
     * =====================
     */
    // 订单客户端消费者
    ApiClient\Order\Interfaces\OrderServiceInterface::class => ApiClient\Order\Clients\OrderServiceClient::class,
    ApiClient\User\Interfaces\UserServiceInterface::class => ApiClient\User\Clients\UserServiceClient::class,

];